#include <iostream>
#include <algorithm>
#include <cstdio>
#include <array>
using namespace std;
/* #ifdef ONLINE_JUDGE */

/* #define getchar() (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2) ? EOF : *p1++) */
/* char buf[1 << 23], *p1 = buf, *p2 = buf, ubuf[1 << 23], *u = ubuf; */

/* #endif */
int read() {
    int p = 0, flg = 1;
    char c = getchar();
    while (c < '0' || c > '9') {
        if (c == '-') flg = -1;
        c = getchar();
    }
    while (c >= '0' && c <= '9') {
        p = p * 10 + c - '0';
        c = getchar();
    }
    return p * flg;
}
void write(int x) {
    if (x < 0) {
        x = -x;
        putchar('-');
    }
    if (x > 9) {
        write(x / 10);
    }
    putchar(x % 10 + '0');
}
bool _stmer;

const int N = 105, M = 1e6 + 5;

array <string, N> getmap(int n, int m) {
    array <string, N> mp;
    for (int i = 1; i <= n; i++)
        mp[i].resize(m + 5, 'R');
    for (int i = 1; i <= n; i++) {
        if (((i - 1) / 2) & 1)
            for (int j = m; j >= 1; j -= 3)
                mp[i][j] = 'R', mp[i][j - 1] = 'G', mp[i][j - 2] = 'B';
        else
            for (int j = 1; j <= m; j += 3)
                mp[i][j] = 'R', mp[i][j + 1] = 'G', mp[i][j + 2] = 'B';
    }
    /* for (int i = 1; i <= n; i++) */
        /* printf("%s\n", mp[i].c_str()); */
    return mp;
}

bool solve(array <string, N> &mp, string &s, int sx, int sy, int n, int len) {
    string ans = "";
    if (mp[sx - 1][sy] == s[1]) sx--;
    if (mp[sx + 1][sy] == s[1]) sx++;
    if (mp[sx][sy - 1] == s[1]) sy--;
    if (mp[sx][sy + 1] == s[1]) sy++;
    int tpx = sx, tpy = sy;
    for (int i = 2; i <= len; i++) {
        if (sx < n / 2)
            if (mp[sx + 1][sy] == s[i]) { sx++, ans.push_back('D'); continue; }
        if (sy < n / 2)
            if (mp[sx][sy + 1] == s[i]) { sy++, ans.push_back('R'); continue; }
        if (sx > n / 2)
            if (mp[sx - 1][sy] == s[i]) { sx--, ans.push_back('U'); continue; }
        if (sy > n / 2)
            if (mp[sx][sy - 1] == s[i]) { sy--, ans.push_back('L'); continue; }
        if (mp[sx - 1][sy] == s[i]) { sx--, ans.push_back('U'); continue; }
        if (mp[sx + 1][sy] == s[i]) { sx++, ans.push_back('D'); continue; }
        if (mp[sx][sy - 1] == s[i]) { sy--, ans.push_back('L'); continue; }
        if (mp[sx][sy + 1] == s[i]) { sy++, ans.push_back('R'); continue; }
        if (!sx || !sy || sx > n ||sy > n) return "";
    }
    if (ans.size() == len - 1) {
        write(n), putchar(32);
        write(n), puts("");
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= n; j++)
                putchar(mp[i][j]);
            puts("");
        }
        write(tpx), putchar(32);
        write(tpy), puts("");
        printf("%s\n", ans.c_str());
        return true;
    }
    return false;
}

void _solve(int n, string &s, int _N) {
    array <string, N> mp = getmap(_N, _N);
    int sx = _N / 2, sy = _N / 2;
    if (solve(mp, s, sx, sy, _N, n)) return;
    else _solve(n, s, _N + 9);
}

char strbuf[M];

bool _edmer;
int main() {
    cerr << (&_stmer - &_edmer) / 1024.0 / 1024.0 << "MB\n";
#ifndef cxqghzj
    freopen("snake.in", "r", stdin);
    freopen("snake.out", "w", stdout);
#endif
    string s;
    scanf("%s", strbuf);
    s = strbuf;
    int n = s.size(); s = " " + s;
    _solve(n, s, 30);
    return 0;
}
/*
GGRRBB
RBBGGR
RGGRBR
GRBRBG
GBBRRG
RRGGBB
*/
